// 配置路由
import Addledger from "@/pages/addLedger"
import Layout from "@/pages/layout"
import Month from "@/pages/month"
import Notfound from "@/pages/notfound"
import Year from "@/pages/year"
import {createBrowserRouter,Navigate} from "react-router-dom"

let router = createBrowserRouter([
    {
        path:"/",
        element:<Layout/>,
        children:[
            {
                path:"",
                element:<Navigate to="month"></Navigate>
            },
            {
                path:"month",
                element:<Month/>
            },
            {
                path:"year",
                element:<Year/>
            },

        ]
    },
    {
        path:"/addledger",
        element:<Addledger/>
    }
    ,
    {
        path:"*",
        element:<Notfound/>
    }
])

export default router